<?php
namespace app\teacher\model;

use app\common\model\Mysql;
use think\Model;

class TeacherManager extends Mysql
{
    const DB_NAME = "teacher";

    public function __construct()
    {
        parent::__construct();
    }

    public function checkLogin($username,$password){
        return $this->getTeacherByCustom(array("name"=>$username,"password"=>md5($password)));
    }

    /*
     * 自定义读取信息方法
     */
    protected function getTeacherByCustom($customKey=[]){
        return $this->selectSQLbyCustom(self::DB_NAME,$customKey);
    }

    
}